<?php
/*require_once(dirname(dirname(__FILE__)) . '/app.php');
require_once "jssdk.php";
$jssdk = new JSSDK($INI['system']['appid'], $INI['system']['appscert']);

$jssdk->getsnsapi_userinfo();*/


$hostName = gethostname();
if ($hostName == 'haioo-web01'||$hostName == 'haioo-web02') {
    $passportDomain = 'wx.haioo.com';
} elseif ($hostName == 'haioo_test') {
    $passportDomain = 'test.wx.haioo.com';
} else {
    $passportDomain = 'dev.wx.haioo.com';
}

$passportPath = ''; // 路径不要以/开头
    // 去主站请求
$uri = 'http://';
$uri .= $passportDomain . '/' . $passportPath . '?';
$uri .= 'otherPlatformRedirect=' . rawurlencode("http://$_SERVER[HTTP_HOST]/wxpay/callback.php");

header("Location:" . $uri);
?>

